package com.cml.rpc.server;

import com.cml.rpc.pojo.User;
import com.cml.rpc.publicinterface.UserService;

import java.util.UUID;

/**
 * @author cml
 * @create 2021/7/20 15:27
 */
public class UserServiceImpl implements UserService {
    @Override
    public User getUserById(Integer id) {
        User user = User.builder().id(id).name(UUID.randomUUID().toString().substring(0, 4)).age("16").build();
        return user;
    }

    @Override
    public Integer insertUser(User user) {
        System.out.println("服务端插入一条user=" + user);
        return 1;
    }
}
